package com.icodingedu.springcloud.service;

import com.icodingedu.springcloud.pojo.PortInfo;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

@FeignClient("feign-client")
public interface IService {

    @GetMapping("/sayhello")
    String sayHello();

    @PostMapping("/sayhello")
    PortInfo sayHello(@RequestBody PortInfo portInfo);

    @GetMapping("/retry")
    String retry(@RequestParam(name="timeout") int timeout);

    @GetMapping("/error")
    String error();
}
